<?php
session_start();
require_once("../models/Request.php");
class RequestUpdatePaymentController{

	var $requestDetails;
	function sendRequestData(){
		$this->requestDetails['amount'] = $_REQUEST['amount'];
		$this->requestDetails['mode'] = $_REQUEST['mode'];
		$this->requestDetails['date_received'] = $_REQUEST['date_received'];
		$this->requestDetails['receipt_no'] = $_REQUEST['receipt_no'];
		$this->requestDetails['message'] = $_REQUEST['message'];
		$this->requestDetails['unit'] = $_REQUEST['unit'];
	}
}

	$a = new RequestUpdatePaymentController;
	$a->sendRequestData();
	$request['message'] = "<br /> Amount: ".$a->requestDetails['amount']."<br />";
	$request['message'] .= "Mode of Payment: ".$a->requestDetails['mode']."<br />";
	$request['message'] .= "Date Received: <br />".$a->requestDetails['date_received']."<br />";
	$request['message'] .= "Receipt Number (if applicable): <br />".$a->requestDetails['receipt_no']."<br />";
	$request['message'] .= "Short message for the management: <br />".$a->requestDetails['message'];
	$request['unit'] = $a->requestDetails['unit'];

	$newRequest = new Request;
	$newRequest->connect();
	$newRequest->addRequest($request);
	echo "You have successfully added a request for payment update.";
?>